﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Business_Layer;

namespace Control_Layer
{
    // See UseCase:
    // UCD06-SELECTIONS (02)
    public class CCSelectComponent
    {
        private Service service;
        private Project project;

        public CCSelectComponent(Service service)
        {
            this.service = service;
            project = service.GetProject;
        }

        private int sx, sy;

        /// <summary>
        /// Set a selection on a specified coordinate of the screen.
        /// </summary>
        /// <param name="sx">The X Coordinate.</param>
        /// <param name="sy">The Y Coordinate.</param>
        public void MakeSelection(int sx, int sy)
        {
            this.sx = sx;
            this.sy = sy;
            project.SelectComponent(sx, sy);
        }

        /// <summary>
        /// Reset the selection.
        /// </summary>
        public void ResetSelection()
        {
            project.ResetSelection();
        }

        /// <summary>
        /// Get the X Coordinate.
        /// </summary>
        public int GetSx
        {
            get { return sx; }
        }

        /// <summary>
        /// Get the Y Coordinate.
        /// </summary>
        public int GetSy
        {
            get { return sy; }
        }
    }
}
